Formal Semantics of the Kconfig Language

نویسندگان

  • Steven She
  • Thorsten Berger
چکیده

The Kconfig language defines a set of symbols that are assigned a value in a configuration. We describe the semantics of the Kconfig language according to the behaviour exhibited in the xconfig configurator. We assume an abstract syntax representation for concepts in the Kconfig language and delegate the details of the translation from concrete to abstract syntaxes to a later document. 1 Abstract syntax Identifiers and expressions. We start be defining the preliminary concepts available in the Kconfig language. Let Id be a finite set of names identifying a symbol—more precisely, Id ∈ P(String). Let Const = Tri ∪ String ∪ Hex ∪ Int be the set of values assignable to each feature and available as constants in expressions, where Tri = {0t, 1t, 2t}. Tri is ordered such that 0t < 1t < 2t. The Tri, String, Hex, and Int domains are disjoint (i.e. mutually exclusive). We can now define an expression in the Kconfig language. KExpr(Id) is a set of expressions over Id generated by the following grammar, where e ∈ KExpr(Id), iv ∈ Id ∪ Const, ⊗ ∈ {or, and}, ⊖ ∈ {=, 6=}: e ::= e⊗ e | not e | iv ⊖ iv | iv (1) Evaluating a KExpr returns a tristate value (i.e. v ∈ Tri). We will define the semantics of an eval function in Section 2.2. Kconfig model. Kconfig denotes the set of all possible models in the Kconfig language. Thus a single Kconfig model m ∈ Kconfig is a tuple consisting of a set of configs and a set of choices. Kconfig is defined as: Kconfig = P(Configs)× P(Choices) (2) Given a Kconfig model m ∈ Kconfig, we define the shorthand mconfig to refer to its set of configs and mchoice to refer to its set of choices. The semantics defined in this document directly reflect the behavior of the Linux make xconfig tool, which could  in some specific cases  act differently from what the Kconfig language developers originally had in mind. At least in case of the reverse dependency the documentation explicitly states the following gap: "Select should be used with care. Select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol foo even if foo depends on bar that is not set."

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Modeling and Evaluation of Stochastic Discrete-Event Systems with RayLang Formalism

In recent years, formal methods have been used as an important tool for performance evaluation and verification of a wide range of systems. In the view points of engineers and practitioners, however, there are still some major difficulties in using formal methods. In this paper, we introduce a new formal modeling language to fill the gaps between object-oriented programming languages (OOPLs) us...

متن کامل

Modeling and Evaluation of Stochastic Discrete-Event Systems with RayLang Formalism

In recent years, formal methods have been used as an important tool for performance evaluation and verification of a wide range of systems. In the view points of engineers and practitioners, however, there are still some major difficulties in using formal methods. In this paper, we introduce a new formal modeling language to fill the gaps between object-oriented programming languages (OOPLs) us...

متن کامل

Dynamic Categorization of Semantics of Fashion Language: A Memetic Approach

Categories are not invariant. This paper attempts to explore the dynamic nature of semantic category, in particular, that of fashion language, based on the cognitive theory of Dawkins’ memetics, a new theory of cultural evolution. Semantic attributes of linguistic memes decrease or proliferate in replication and spreading, which involves a dynamic development of semantic category. More specific...

متن کامل

Formal Semantics of the CDL Language

We reverse-engineer a formal semantics of the Component Definition Language (CDL), which is part of the highly configurable, embedded operating system eCos. This work provides the basis for an analysis and comparison of the two variability-modeling languages Kconfig and CDL. The semantics given in this document are based on analyzing the CDL documentation, inspecting the source code of the tool...

متن کامل

Application of Frame Semantics to Teaching Seeing and Hearing Vocabulary to Iranian EFL Learners

A term in one language rarely has an absolute synonymous meaning in the same language; besides, it rarely has an equivalent meaning in an L2. English synonyms of seeing and hearing are particularly grammatically and semantically different. Frame semantics is a good tool for discovering differences between synonymous words in L2 and differences between supposed L1 and L2 equivalents. Vocabulary ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010